package com.yuanfeng.goods.service;


import com.yuanfeng.commoms.dto.goods.GoodsListQueryEsDTO;
import com.yuanfeng.commoms.dto.goods.ShopListQueryDTO;
import com.yuanfeng.commoms.dto.goods.WebGoodsListQueryDTO;
import com.yuanfeng.commoms.dto.shop.ArticleDTO;
import com.yuanfeng.commoms.dto.shop.ArticleShopDTO;
import com.yuanfeng.commoms.dto.shop.WebShopListQueryDTO;
import com.yuanfeng.commoms.dto.shop.WebShopListQueryEsDTO;
import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public interface ElasticSearchService {
    public List<ArticleDTO> selectAll();

    /**
     * commonId
     * @param commonId
     * @return
     */
    GoodsListQueryEsDTO selectByCommonId(Integer commonId);
    /**
     * 根据goodsId查询商品信息
     * @param goodsId
     * @return
     */
    GoodsListQueryEsDTO selectByGoodsId(Integer goodsId);

    /**
     * 查询店铺id
     * @param commonId
     * @return
     */
    GoodsListQueryEsDTO selectShopIdByCommonId(Integer commonId);

    /**
     * 查询所有店铺
     * @return
     */
    List<ArticleShopDTO> selectAllShop();

    /**
     * 根据shopId查询店铺信息
     * @param shopId
     * @return
     */
    List<WebShopListQueryEsDTO> selectByShopId(Integer shopId);

    /**
     * 查询店铺配置信息
     * @param shopId
     * @return
     */
    ShopListQueryDTO selectByH5ShopId(Integer shopId);

    /**
     * pc的商品搜索
     *
     * @param webGoodsListQueryParam
     * @return
     * @throws Exception
     */
    ResponseResult pcSeachGoodsData(WebGoodsListQueryDTO webGoodsListQueryParam);

    /**
     * pc的店铺搜索
     *
     * @param webGoodsListQueryParam
     * @return
     * @throws Exception
     */
    ResponseResult pcSeachShopData(@RequestBody WebShopListQueryDTO webGoodsListQueryParam);

    /**
     * 创建商品索引库
     */
    ResponseResult createGoodsIndex();

    /**
     * 创建店铺索引库
     */
    ResponseResult createShopIndex();

    /**
     * 删除商品索引库
     */
    ResponseResult deleteGoodsIndex();

    /**
     * 删除店铺索引库
     */
    ResponseResult deleteShopIndex();

    /**
     * 导入商品数据
     */
    ResponseResult importData();

    /**
     * 导入店铺信息
     */
    ResponseResult importShopData();

    /**
     * 删除所有商品数据
     */
    ResponseResult deleteGoodsData();

    /**
     * 删除所有店铺数据
     */
    ResponseResult deleteShopData();

    /**
     * h5的商品搜索
     *
     * @param webGoodsListQueryParam
     * @return
     * @throws Exception
     */
    ResponseResult h5SeachGoodsData(WebGoodsListQueryDTO webGoodsListQueryParam);

    /**
     * h5的店铺搜索
     *
     * @param shopListQueryParam
     * @return
     * @throws Exception
     */
    ResponseResult h5SeachShopData(ShopListQueryDTO shopListQueryParam);

    /**
     * pc的商品搜索 查询品牌 商品属性等
     * @param webGoodsListQueryParam
     * @return
     * @throws Exception
     */
    ResponseResult querySeachBrandAttributeData(WebGoodsListQueryDTO webGoodsListQueryParam);
}
